home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / Zope.exe / DEBUGGING.TXT < prev    next >
Encoding:
Text File  |  1999-08-16  |  1.6 KB  |  53 lines

  1.  
  2. Running Zope in Debug Mode
  3.  
  4.   If you wish to run Zope in debug mode, use the -D command line
  5.   switch.  This will have the following effect::
  6.  
  7.    o On UNIX, Zope will not detach from the controlling terminal.
  8.  
  9.    o Zope will print logging information to standard error.
  10.  
  11.    o The Z_DEBUG_MODE environment variable gets set, which causes some 
  12.      other cool stuff in Zope to happen.
  13.  
  14. Using the Medusa Monitor
  15.  
  16.   If you're running ZServer with a medusa monitor port, you can
  17.   connect and interact via a python prompt with a running Zope
  18.   session, while others interact with it over the web.
  19.  
  20.   Some constraints:
  21.  
  22.    o You must connect to a server running on the local host.
  23.  
  24.    o You must authenticate as superuser.
  25.  
  26.    o At the time of writing the superuser password (in the access
  27.      file) must be plain text, not encrypted.
  28.  
  29.   To use the monitor, start it from the shell prompt like so (as if
  30.   from the Zope root; must be python 1.5.2 or later):
  31.  
  32.   python ZServer/medusa/monitor_client.py localhost 8099
  33.  
  34.   You'll get back a python prompt.  To connect with the running Zope
  35.   session:
  36.  
  37.   >>> import Zope
  38.   >>> app = Zope.app()
  39.   >>> dir(app.Control_Panel.Products)
  40.   ['ExternalMethod', 'MIMETools', 'MailHost', 'OFSP', 'ZCatalog',
  41.   'ZGadflyDA', 'ZSQLMethods', '_objects']
  42.   >>> 
  43.  
  44.   To see ODB changes effected via the web since you got the app, you
  45.   may have to do a bit of magic:
  46.  
  47.   >>> app._p_jar.sync()
  48.  
  49.   To commit changes you make, before exiting, you may have to do
  50.   another bit of magic:
  51.  
  52.   >>> get_transaction().commit()
  53.